MYSQL 密码过期解决办法 |
您所在的位置:网站首页 › 你的密码已过期,必须更改 无法登陆 › MYSQL 密码过期解决办法 |
mysql5.7 关于密码问题 报错: ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords. 翻译: 错误1862(HY000):你的密码已经过期。登录必须改变它使用一个客户端,支持过期的密码。
原网站 http://blog.vpupv.com:88/index.php/archives/17/
Windows解决该问题:
1:首先:任务管理器--》关闭mysqld.exe进程; 2:先进入mysql的bin目录下,运行如下: > mysqld --skip-grant-tables 变为不可操作状态、然后再新打开一个命令窗; 3:进入bin目录下、 运行: > mysql 如下:
选择数据库 运行: > use mysql; 查看数据 运行: > select * from mysql.user where user=’root’ \G 将密码过期修改为 密码不过期; 运行: > UPDATE user SET `password_expired`='N' where user='root'; 修改密码 运行: > UPDATE user SET `authentication_string` = PASSWORD('root'); 注释: password_expired Y -> 密码过期; N -> 密码不过期; authentication_string 这个字段是MySQL5.7版本的密码字段、由之前的password变为authentication_string
运行: > flush privileges; flush privileges 命令本质上的作用是将当前user和privilige表中的 用户信息/权限设置从mysql库(MySQL数据库的内置库)中提取到内存里; 运行: >quit; / exit; 运行其中一个、结束本次操作; 运行: > net start MySQL; 重启mysql服务;便ok;
如果是在linux系统操作、 记得注释掉/etc/my.cnf 的 skip-grant-tables;
在安装mysql、运行mysqld install时候 遇到报错,如下: Install/Remove of the Service Denied; 解决方法: 打开cmd.exe程序的时候选择“用管理员身份打开”。 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |